package com.example.sentinel.consumer.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @description:
 * @author: luojm
 * @create: 2020-09-01 14:18
 */
@Component
public class ProviderClientFallbackFactory implements FallbackFactory<ProviderClient> {

    @Override
    public ProviderClient create(Throwable cause) {
        ProviderClientFallback providerClientFallback = new ProviderClientFallback();
        providerClientFallback.setCause(cause);
        return providerClientFallback;
    }
}
